Skip to content

Conversation

@exacs
Copy link
Contributor

@exacs exacs commented Oct 24, 2025

This PR

  1. Changes how <OptimizelyGridSection> renders by searching in the component registry if there is any component defined as _Row or _Column
  2. Ensure <OptimizelyGridSection> renders properly by making the prop nodes mandatory
  3. Ensure <OptimizelyComponent> searches Display Template Keys when they are defined in the Section level

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the component registry system to support globally defined _Row and _Column components, while also improving display template resolution at the section level. The changes enable more flexible component rendering configurations through the registry.

Key changes:

  • Made nodes prop mandatory in OptimizelyGridSection to prevent runtime errors
  • Added support for _Row and _Column registry lookups with fallback chain
  • Extended display template key resolution to check section-level composition keys

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/optimizely-cms-sdk/src/react/server.tsx Enhanced grid section rendering to check registry for _Row/_Column components, made nodes required, and improved display template key resolution
test/test-website/src/components/with-display-templates.tsx Added test display templates and component variants for rows/columns, removed console.log statements, and exported components for registry
test/test-website/src/app/preview/page.tsx Added conditional check before logging error request query
test/test-website/src/app/preview/layout.tsx Simplified by reusing root layout
test/test-website/src/app/en/layout.tsx Registered new display templates and _Row/_Column components in the registry
test/test-website/src/app/all/[...slug]/layout.tsx Simplified by reusing root layout

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@exacs exacs merged commit c189e70 into main Oct 28, 2025
2 checks passed
@exacs exacs deleted the feature/CMS-44289-global-row-column branch October 28, 2025 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants